Anchors

These are the named Anchor types that jsPlumb provides. You don't create these directly; you pass in an anchor definition to an appropriate jsPlumb method and an anchor is created for you. To use a named anchor type you can either reference it directly as a string:

anchor:"Bottom"

or, in the case of the Perimeter anchor, as an array:

anchor:[ "Perimeter", { anchorCount:25, shape:"circle" } ]

Source:
  • jsplumb-api.js, line 61

Members

<static> Assign

An Anchor whose location is assigned at connection time, through an AnchorPositionFinder. Used in conjunction with the 'makeTarget' function. jsPlumb has two of these - Fixed and Grid, and you can also write your own.

Source:
  • jsplumb-api.js, line 73

<static> AutoDefault

Default DynamicAnchors - chooses from TopCenter, RightMiddle, BottomCenter, LeftMiddle.

Source:
  • jsplumb-api.js, line 72

<static> Bottom

An Anchor that is located at the bottom center of the element.

Source:
  • jsplumb-api.js, line 64

<static> BottomLeft

An Anchor that is located at the bototm left corner of the element.

Source:
  • jsplumb-api.js, line 71

<static> BottomRight

An Anchor that is located at the bottom right corner of the element.

Source:
  • jsplumb-api.js, line 69

<static> Center

An Anchor that is located at the center of the element.

Source:
  • jsplumb-api.js, line 67

<static> Continuous

An Anchor that tracks the other element in the connection, choosing the closest face.

Source:
  • jsplumb-api.js, line 74

<static> ContinuousBottom

A continuous anchor that uses only the bottom edge of the element.

Source:
  • jsplumb-api.js, line 77

<static> ContinuousLeft

A continuous anchor that uses only the left edge of the element.

Source:
  • jsplumb-api.js, line 75

<static> ContinuousRight

A continuous anchor that uses only the right edge of the element.

Source:
  • jsplumb-api.js, line 78

<static> ContinuousTop

A continuous anchor that uses only the top edge of the element.

Source:
  • jsplumb-api.js, line 76

<static> Left

An Anchor that is located at the left middle of the element.

Source:
  • jsplumb-api.js, line 65

<static> Perimeter

An Anchor that tracks the perimeter of some shape, approximating it with a given number of dynamically positioned locations.

Source:
  • jsplumb-api.js, line 79

An Anchor that is located at the right middle of the element.

Source:
  • jsplumb-api.js, line 66

<static> Top

An Anchor that is located at the top center of the element.

Source:
  • jsplumb-api.js, line 63

<static> TopLeft

An Anchor that is located at the top left corner of the element.

Source:
  • jsplumb-api.js, line 70

<static> TopRight

An Anchor that is located at the top right corner of the element.

Source:
  • jsplumb-api.js, line 68

Methods

<static> Continuous(params)

Parameters:
Name Type Argument Description
params Object <optional>

Constructor parameters

Properties
Name Type Argument Description
faces String[] <optional>

Optional array of faces for the anchor. Valid values are "top", "left", "bottom" and "right".

Source:
  • jsplumb-api.js, line 81

<static> Perimeter(params)

Parameters:
Name Type Description
params Object

Constructor parameters

Properties
Name Type Argument Default Description
anchorCount Integer <optional>
60

Optional number of anchors to use to approximate the perimeter. default is 60.

shape String

Required. the name of the shape. Valid values are 'rectangle', 'square', 'ellipse', 'circle', 'triangle' and 'diamond'

rotation Number <optional>

Optional rotation, in degrees, to apply.

Source:
  • jsplumb-api.js, line 83